package com.lizy.order.web;

import com.lizy.order.stock.StockFeignService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/order")
public class OrderController {

    @Resource
    StockFeignService stockFeignService;

    @RequestMapping("/add")
    public String add() {
        //远程调用仓库服务
        System.out.println("成功");
        String message = stockFeignService.reduct();
        return "下单成功，message=" + message;
    }
}
